<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
  <title>notifications (UsersController)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
  <pre><span class="ruby-comment cmt"># File users_controller.rb, line 160</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">notifications</span>
                <span class="ruby-ivar">@title</span> = <span class="ruby-value str">&quot;Notificaciones Pendientes&quot;</span>
                <span class="ruby-ivar">@pending_notifications</span> = []
                <span class="ruby-identifier">friendships</span> = <span class="ruby-identifier">friendships</span> = <span class="ruby-constant">User</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:id</span>]).<span class="ruby-identifier">a_users</span>
                <span class="ruby-identifier">friendships</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">notification</span><span class="ruby-operator">|</span>
                        <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">notification</span>.<span class="ruby-identifier">status</span> <span class="ruby-operator">==</span> <span class="ruby-value">3</span>
                                <span class="ruby-ivar">@user</span> = <span class="ruby-constant">User</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">notification</span>.<span class="ruby-identifier">user_b_id</span>)
                                <span class="ruby-ivar">@pending_notifications</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@user</span>
                        <span class="ruby-keyword kw">end</span>
                <span class="ruby-keyword kw">end</span>
  <span class="ruby-keyword kw">end</span></pre>
</body>
</html>